<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.hz.model.Activity"%>
<%@page import="com.hz.util.ParamUtil"%>
<%@page import="com.hz.control.ActivityControl"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <title>My JSP 'index.jsp' starting page</title>
  </head>
  
  <body>
  <%
       request.setCharacterEncoding("utf-8");
      int acid = ParamUtil.getInt(request,"acid");
       Activity a = new Activity();
       a.setActName(ParamUtil.getString(request,"actName","无"));
       a.setActType(ParamUtil.getInt(request,"actType"));
       a.setPeopleNum(ParamUtil.getInt(request,"peopleNum"));
       a.setStartTime(ParamUtil.getString(request,"startTime","无"));
       a.setEndTime(ParamUtil.getString(request,"endTime","无"));
       a.setPlace(ParamUtil.getString(request,"place","无"));
       a.setCost(ParamUtil.getInt(request,"cost",0));
       a.setCostDetail(ParamUtil.getString(request,"costDetail","无"));
       a.setResource(ParamUtil.getString(request,"resource","无"));
       a.setLeader(ParamUtil.getString(request,"leader","无"));
       //a.setContent(ParamUtil.getString(request,"content1","无"));
       a.setContent(request.getParameter("content1"));
       a.setDepartmentId(ParamUtil.getInt(request,"departmentId"));
       
       if(ActivityControl.updateActivity(a,acid)){
       %>
       <script>
       alert("修改活动成功");
       window.location.href="../../common/activity/activities.jsp"
       </script>
       <%
       
       }else{
   %>
   <script>
       alert("修改活动失败");
       history.go(-1);
       </script>
       <%} %>
  </body>
</html>
